package edu.washington.cs.workflow.analysis.guistructure;

import edu.washington.cs.workflow.util.Utils;

/**
 * The index of the same type
 * */
public class UIPos {
	
	private final int indexOfTheSameType;
	
	public static UIPos make(int num) {
		return new UIPos(num);
	}
	
	protected UIPos(int num) {
		Utils.checkTrue(num >= 0, "The num is not correct: " + num);
		this.indexOfTheSameType = num;
	}
	
	public int getIndex() {
		return this.indexOfTheSameType;
	}
	
	public String[] getPaths() {
		throw new Error("Cannot call this on UIPos. Only available on MenuPos.");
	}
	
	@Override
	public String toString() {
		return "UI Pos: " + this.indexOfTheSameType;
	}
}